package com.founder.ivrapi.modular.service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.founder.ivrapi.modular.entity.CtiCdrEntity;
import com.founder.ivrapi.modular.mapper.CtiCdrMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * cti_cdr服务实现类
 */
@Service
public class CtiCdrService extends ServiceImpl<CtiCdrMapper, CtiCdrEntity> {
	@Autowired
	private CtiCdrMapper ctiCdrMapper;

	/**
	 * 判断呼入号码是否24小时内打入过
	 */
	public boolean isCallerIn24Hour(String caller,String called) {
		return this.ctiCdrMapper.getCallerIn24HourCount(caller,called) >  0;
	}
}
